# -*- coding: UTF-8 -*-
import sys
from app.main import main
from app.models import *
from flask import *
from flask_security import current_user, login_user,login_required
reload(sys)
sys.setdefaultencoding('utf-8')


@main.route('/', methods=['GET'])
def index():
    # user_datastore.create_user(email='matt@nobien.net', password='password')

    return 'heelo'


@main.route('/loginneed', methods=['GET'])
@login_required
def post():
    return 'loginneed'


@main.route('/login', methods=['GET'])
def login():
    user = request.args.get('user', '')
    # password = request.args.get('password', '')
    login_user(user)
    return 'login'